/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package restaurant;

import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Thays
 */
public class ConnectionFactory {
    
    public java.sql.Connection getConnection(String serverName, String userName, String password) {
        String url = "jdbc:mysql://"+serverName;
        try {
            return DriverManager.getConnection(url,userName,password);
        } 
        catch (SQLException e){
            throw new RuntimeException(e);
        }
    }
    

    
}
